<%@ page import="com.lanou3g.code0522.Person" %>
<%@ page import="java.util.Map" %>
<%@ page import="java.util.HashMap" %><%--
  Created by IntelliJ IDEA.
  User: dllo
  Date: 18/5/22
  Time: 上午10:43
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
//    application.setAttribute("keyapp","app域");
//    session.setAttribute("keysession","session域");
//request.setAttribute("keyrequest", "request域");
//    pageContext.forward("test03.jsp");
    application.setAttribute("keyapp","app域");
    session.setAttribute("keysession","session域");
    request.setAttribute("keyrequest","request域");

    Person person =new Person();
    person.setName("张三");
    person.setAge(18);
    session.setAttribute("user",person);

    //定义的时候写泛型,
    //new的时候不写泛型
    //这是java1.7的类型推断机制 jsp没有
    //所以 泛型 不能省
    Map<String,String> jobs
            =new HashMap<String,String>();
    jobs.put("lanou","CEO");
    jobs.put("bai-du","CTO");
    person.setJobs(jobs);
    String[]title={"地下城与勇士","国服第一剑魂"};
    person.setTitles(title);


    pageContext.forward("/test03.jsp?username=hahaha");
%>
